tinybird 0.0.1.dev101__tar.gz → 0.0.1.dev102__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.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/prompts.py +8 -11
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/mock.py +23 -7
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/shell.py +1 -1
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/setup.cfg +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/auth.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/fmt.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/playground.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/tag.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -448,16 +448,13 @@ Use the following format to generate the response and do not wrap it in any othe
|
|
|
448
448
|
)
|
|
449
449
|
|
|
450
450
|
|
|
451
|
-
def mock_prompt(rows: int, feedback: str = ""
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
{feedback}
|
|
459
|
-
History of previous results:
|
|
460
|
-
{history}"""
|
|
451
|
+
def mock_prompt(rows: int, feedback: str = "") -> str:
|
|
452
|
+
if feedback:
|
|
453
|
+
feedback = f"""In case the <feedback> tag is present and not empty,
|
|
454
|
+
it means there was a previous attempt to generate the resources and the system provided feedback about the previous response.
|
|
455
|
+
Use the following feedback to regenerate the response:
|
|
456
|
+
<feedback>{feedback}</feedback>
|
|
457
|
+
"""
|
|
461
458
|
|
|
462
459
|
return f"""
|
|
463
460
|
Given the schema for a Tinybird datasource, return a can you create a clickhouse sql query to generate some random data that matches that schema.
|
|
@@ -600,7 +597,7 @@ Follow the instructions and generate the following response with no additional t
|
|
|
600
597
|
<sql>[raw sql query here]</sql>
|
|
601
598
|
</response>
|
|
602
599
|
|
|
603
|
-
{
|
|
600
|
+
{feedback}
|
|
604
601
|
|
|
605
602
|
"""
|
|
606
603
|
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev102'
|
|
8
|
+
__revision__ = '627c8ef'
|
|
@@ -70,15 +70,31 @@ async def mock(ctx: click.Context, datasource: str, rows: int, prompt: str) -> N
|
|
|
70
70
|
llm = LLM(user_token=user_token, host=user_client.host)
|
|
71
71
|
prompt = f"<datasource_schema>{datasource_content}</datasource_schema>\n<user_input>{prompt}</user_input>"
|
|
72
72
|
sql = ""
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
attempts = 0
|
|
74
|
+
data = []
|
|
75
|
+
error = ""
|
|
76
|
+
sql_path = None
|
|
77
|
+
while True:
|
|
78
|
+
try:
|
|
79
|
+
response = llm.ask(system_prompt=mock_prompt(rows, error), prompt=prompt)
|
|
80
|
+
sql = extract_xml(response, "sql")
|
|
81
|
+
sql_path = persist_fixture_sql(datasource_name, sql, folder)
|
|
82
|
+
result = await tb_client.query(f"{sql} FORMAT JSON")
|
|
83
|
+
data = result.get("data", [])[:rows]
|
|
84
|
+
error_response = result.get("error", None)
|
|
85
|
+
if error_response:
|
|
86
|
+
raise CLIException(error_response)
|
|
87
|
+
else:
|
|
88
|
+
break
|
|
89
|
+
except Exception as e:
|
|
90
|
+
error = str(e)
|
|
91
|
+
attempts += 1
|
|
92
|
+
if attempts > 5:
|
|
93
|
+
raise Exception(f"Failed to generate a valid solution. Check {str(sql_path)} and try again.")
|
|
94
|
+
else:
|
|
95
|
+
continue
|
|
79
96
|
|
|
80
97
|
fixture_path = persist_fixture(datasource_name, data, folder)
|
|
81
|
-
|
|
82
98
|
click.echo(FeedbackManager.info(message=f"✓ /fixtures/{datasource_name}.ndjson created"))
|
|
83
99
|
if env == "cloud":
|
|
84
100
|
await append_fixture(tb_client, datasource_name, str(fixture_path))
|
|
@@ -357,7 +357,7 @@ def print_table_formatted(res: dict, name: str):
|
|
|
357
357
|
bytes_read = humanfriendly.format_size(stats.get("bytes_read", 0))
|
|
358
358
|
elapsed = humanfriendly.format_timespan(elapsed) if elapsed >= 1 else f"{elapsed * 1000:.2f}ms"
|
|
359
359
|
stats_message = f"» {bytes_read} ({rows_read} rows x {cols} cols) in {elapsed}"
|
|
360
|
-
rows_message = f"» Showing {limit}
|
|
360
|
+
rows_message = f"» Showing first {limit} rows" if row_count > limit else "» Showing all rows"
|
|
361
361
|
click.echo(FeedbackManager.success(message=stats_message))
|
|
362
362
|
click.echo(FeedbackManager.gray(message=rows_message))
|
|
363
363
|
except ValueError as exc:
|
|
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.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb/modules/datafile/parse_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/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
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/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
|
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev101 → tinybird-0.0.1.dev102}/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
|