tinybird 0.0.1.dev326__tar.gz → 0.0.1.dev327__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/sql_template_fmt.py +10 -2
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/common.py +4 -1
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/format_pipe.py +44 -5
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/cli.py +6 -6
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/setup.cfg +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/service_datasources.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/__init__.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/agent.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/animations.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/banner.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/command_agent.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/compactor.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/explore_agent.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/file_agent.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/memory.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/mock_agent.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/models.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/prompts.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/testing_agent.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/__init__.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/analyze.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/append.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/build.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/datafile.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/deploy.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/deploy_check.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/diff_resource.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/execute_query.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/file.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/get_endpoint_stats.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/get_openapi_definition.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/mock.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/plan.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/request_endpoint.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/run_command.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/secret.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/test.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/utils.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/branch.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/connection_kafka.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/deployment_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/job_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/local_logs.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/login_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/mock_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -261,7 +261,13 @@ def _calc_str(self) -> str:
|
|
|
261
261
|
Comment._calc_str = property(_calc_str)
|
|
262
262
|
|
|
263
263
|
|
|
264
|
-
def format_sql_template(
|
|
264
|
+
def format_sql_template(
|
|
265
|
+
sql: str,
|
|
266
|
+
line_length: Optional[int] = None,
|
|
267
|
+
lower_keywords: bool = False,
|
|
268
|
+
resource_name: Optional[str] = None,
|
|
269
|
+
resource_source: Optional[str] = None,
|
|
270
|
+
) -> str:
|
|
265
271
|
try:
|
|
266
272
|
# https://github.com/tconbeer/sqlfmt/blob/c11775b92d8a45f0e91d871b81a88a894d620bec/src/sqlfmt/mode.py#L16-L29
|
|
267
273
|
config: Dict[str, Any] = {
|
|
@@ -277,5 +283,7 @@ def format_sql_template(sql: str, line_length: Optional[int] = None, lower_keywo
|
|
|
277
283
|
else api.format_string(sql, mode=mode).strip()
|
|
278
284
|
)
|
|
279
285
|
except Exception as e:
|
|
280
|
-
|
|
286
|
+
resource_info = f" in '{resource_name}'" if resource_name else ""
|
|
287
|
+
source_info = f" ({resource_source})" if resource_source else ""
|
|
288
|
+
logging.warning(f"sqlfmt error{resource_info}{source_info}: {str(e)}")
|
|
281
289
|
return sql
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev327'
|
|
8
|
+
__revision__ = '011a278'
|
|
@@ -987,7 +987,10 @@ def push_data(
|
|
|
987
987
|
cb.prev_done = 0 # type: ignore[attr-defined]
|
|
988
988
|
|
|
989
989
|
if not silent:
|
|
990
|
-
|
|
990
|
+
if mode == "replace":
|
|
991
|
+
click.echo(FeedbackManager.highlight(message=f"\n» Replacing data in {datasource_name}..."))
|
|
992
|
+
else:
|
|
993
|
+
click.echo(FeedbackManager.highlight(message=f"\n» Appending data to {datasource_name}..."))
|
|
991
994
|
|
|
992
995
|
if isinstance(url, list):
|
|
993
996
|
urls = url
|
|
@@ -25,11 +25,25 @@ from tinybird.tb.modules.datafile.format_datasource import format_engine
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def format_node_sql(
|
|
28
|
-
file_parts: List[str],
|
|
28
|
+
file_parts: List[str],
|
|
29
|
+
node: Dict[str, Any],
|
|
30
|
+
line_length: Optional[int] = None,
|
|
31
|
+
lower_keywords: bool = False,
|
|
32
|
+
resource_name: Optional[str] = None,
|
|
33
|
+
resource_source: Optional[str] = None,
|
|
29
34
|
) -> List[str]:
|
|
30
35
|
file_parts.append("SQL >")
|
|
31
36
|
file_parts.append(DATAFILE_NEW_LINE)
|
|
32
|
-
file_parts.append(
|
|
37
|
+
file_parts.append(
|
|
38
|
+
format_sql(
|
|
39
|
+
node["sql"],
|
|
40
|
+
DATAFILE_INDENT,
|
|
41
|
+
line_length=line_length,
|
|
42
|
+
lower_keywords=lower_keywords,
|
|
43
|
+
resource_name=resource_name,
|
|
44
|
+
resource_source=resource_source,
|
|
45
|
+
)
|
|
46
|
+
)
|
|
33
47
|
file_parts.append(DATAFILE_NEW_LINE)
|
|
34
48
|
file_parts.append(DATAFILE_NEW_LINE)
|
|
35
49
|
return file_parts
|
|
@@ -93,8 +107,21 @@ def format_pipe_include(file_parts: List[str], node: Dict[str, Any], includes: D
|
|
|
93
107
|
return file_parts
|
|
94
108
|
|
|
95
109
|
|
|
96
|
-
def format_sql(
|
|
97
|
-
sql
|
|
110
|
+
def format_sql(
|
|
111
|
+
sql: str,
|
|
112
|
+
DATAFILE_INDENT: str,
|
|
113
|
+
line_length: Optional[int] = None,
|
|
114
|
+
lower_keywords: bool = False,
|
|
115
|
+
resource_name: Optional[str] = None,
|
|
116
|
+
resource_source: Optional[str] = None,
|
|
117
|
+
) -> str:
|
|
118
|
+
sql = format_sql_template(
|
|
119
|
+
sql.strip(),
|
|
120
|
+
line_length=line_length,
|
|
121
|
+
lower_keywords=lower_keywords,
|
|
122
|
+
resource_name=resource_name,
|
|
123
|
+
resource_source=resource_source,
|
|
124
|
+
)
|
|
98
125
|
return "\n".join([f"{DATAFILE_INDENT}{part}" for part in sql.split("\n") if len(part.strip())])
|
|
99
126
|
|
|
100
127
|
|
|
@@ -105,6 +132,8 @@ def format_node(
|
|
|
105
132
|
line_length: Optional[int] = None,
|
|
106
133
|
unroll_includes: bool = False,
|
|
107
134
|
lower_keywords: bool = False,
|
|
135
|
+
resource_name: Optional[str] = None,
|
|
136
|
+
resource_source: Optional[str] = None,
|
|
108
137
|
) -> None:
|
|
109
138
|
if not unroll_includes:
|
|
110
139
|
format_pipe_include(file_parts, node, includes)
|
|
@@ -119,7 +148,14 @@ def format_node(
|
|
|
119
148
|
|
|
120
149
|
Doc = namedtuple("Doc", ["description"])
|
|
121
150
|
format_description(file_parts, Doc(node.get("description", "")))
|
|
122
|
-
format_node_sql(
|
|
151
|
+
format_node_sql(
|
|
152
|
+
file_parts,
|
|
153
|
+
node,
|
|
154
|
+
line_length=line_length,
|
|
155
|
+
lower_keywords=lower_keywords,
|
|
156
|
+
resource_name=resource_name,
|
|
157
|
+
resource_source=resource_source,
|
|
158
|
+
)
|
|
123
159
|
format_node_type(file_parts, node)
|
|
124
160
|
|
|
125
161
|
|
|
@@ -132,6 +168,7 @@ def format_pipe(
|
|
|
132
168
|
for_deploy_diff: bool = False,
|
|
133
169
|
skip_eval: bool = False,
|
|
134
170
|
content: Optional[str] = None,
|
|
171
|
+
resource_source: Optional[str] = None,
|
|
135
172
|
) -> str:
|
|
136
173
|
if datafile:
|
|
137
174
|
doc = datafile
|
|
@@ -178,6 +215,8 @@ def format_pipe(
|
|
|
178
215
|
line_length=line_length,
|
|
179
216
|
unroll_includes=unroll_includes,
|
|
180
217
|
lower_keywords=bool(for_deploy_diff),
|
|
218
|
+
resource_name=filename,
|
|
219
|
+
resource_source=resource_source,
|
|
181
220
|
)
|
|
182
221
|
|
|
183
222
|
if not unroll_includes:
|
|
@@ -983,8 +983,8 @@ async def materialize(
|
|
|
983
983
|
ctx: Context,
|
|
984
984
|
filename: str,
|
|
985
985
|
push_deps: bool,
|
|
986
|
-
workspace_map:
|
|
987
|
-
workspace:
|
|
986
|
+
workspace_map: Tuple[Tuple[str, str], ...],
|
|
987
|
+
workspace: Tuple[Tuple[str, str], ...],
|
|
988
988
|
no_versions: bool,
|
|
989
989
|
verbose: bool,
|
|
990
990
|
force_populate: Optional[str],
|
|
@@ -999,7 +999,7 @@ async def materialize(
|
|
|
999
999
|
click.echo(deprecation_notice)
|
|
1000
1000
|
cl = create_tb_client(ctx)
|
|
1001
1001
|
|
|
1002
|
-
async def _try_push_pipe_to_analyze(pipe_name):
|
|
1002
|
+
async def _try_push_pipe_to_analyze(pipe_name: str) -> Optional[Any]:
|
|
1003
1003
|
try:
|
|
1004
1004
|
to_run = await folder_push(
|
|
1005
1005
|
cl,
|
|
@@ -1020,7 +1020,7 @@ async def materialize(
|
|
|
1020
1020
|
except AlreadyExistsException as e:
|
|
1021
1021
|
if "Datasource" in str(e):
|
|
1022
1022
|
click.echo(str(e))
|
|
1023
|
-
return
|
|
1023
|
+
return None
|
|
1024
1024
|
if override_pipe or click.confirm(FeedbackManager.info_pipe_exists(name=pipe_name)):
|
|
1025
1025
|
to_run = await folder_push(
|
|
1026
1026
|
cl,
|
|
@@ -1038,7 +1038,7 @@ async def materialize(
|
|
|
1038
1038
|
verbose=verbose,
|
|
1039
1039
|
)
|
|
1040
1040
|
else:
|
|
1041
|
-
return
|
|
1041
|
+
return None
|
|
1042
1042
|
except click.ClickException as ex:
|
|
1043
1043
|
# HACK: By now, datafile raises click.ClickException instead of
|
|
1044
1044
|
# CLIException to avoid circular imports. Thats we need to trace
|
|
@@ -1229,7 +1229,7 @@ async def materialize(
|
|
|
1229
1229
|
raise CLIException(FeedbackManager.error_exception(error=str(e)))
|
|
1230
1230
|
|
|
1231
1231
|
|
|
1232
|
-
def __patch_click_output():
|
|
1232
|
+
def __patch_click_output() -> None:
|
|
1233
1233
|
import re
|
|
1234
1234
|
|
|
1235
1235
|
CUSTOM_PATTERNS: List[str] = []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/deploy_check.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/diff_resource.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/execute_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/request_endpoint.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/agent/tools/run_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/datafile/pipe_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb/modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev326 → tinybird-0.0.1.dev327}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|