tinybird 0.0.1.dev38__tar.gz → 0.0.1.dev39__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.dev38 → tinybird-0.0.1.dev39}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/build.py +19 -7
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/shell.py +4 -4
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/setup.cfg +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/auth.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/build_client.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/fmt.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/tag.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/update.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -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.dev39'
|
|
8
|
+
__revision__ = 'b1233f1'
|
|
@@ -16,7 +16,7 @@ from tinybird.tb.modules.datafile.fixture import build_fixture_name, get_fixture
|
|
|
16
16
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
17
17
|
from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
18
18
|
from tinybird.tb.modules.project import Project
|
|
19
|
-
from tinybird.tb.modules.shell import Shell
|
|
19
|
+
from tinybird.tb.modules.shell import Shell, print_table_formatted
|
|
20
20
|
from tinybird.tb.modules.watch import watch_project
|
|
21
21
|
|
|
22
22
|
|
|
@@ -39,17 +39,20 @@ def build(ctx: click.Context, watch: bool) -> None:
|
|
|
39
39
|
rebuild_fixture(project, tb_client, file_changed)
|
|
40
40
|
else:
|
|
41
41
|
build_project(project, tb_client)
|
|
42
|
+
new_tb_client = asyncio.run(get_tinybird_local_client(str(project.path)))
|
|
43
|
+
try:
|
|
44
|
+
if file_changed:
|
|
45
|
+
build_and_print_resource(new_tb_client, file_changed)
|
|
46
|
+
except Exception:
|
|
47
|
+
pass
|
|
42
48
|
|
|
43
49
|
process()
|
|
44
50
|
time_end = time.time()
|
|
45
51
|
elapsed_time = time_end - time_start
|
|
46
|
-
|
|
47
|
-
click.echo(FeedbackManager.success(message="\n✓ Build completed in 0.0000001s"))
|
|
48
|
-
else:
|
|
49
|
-
click.echo(FeedbackManager.success(message=f"\n✓ Build completed in {elapsed_time:.1f}s"))
|
|
52
|
+
click.echo(FeedbackManager.success(message=f"\n✓ Build completed in {elapsed_time:.1f}s"))
|
|
50
53
|
|
|
51
54
|
if watch:
|
|
52
|
-
shell = Shell(project=project
|
|
55
|
+
shell = Shell(project=project)
|
|
53
56
|
click.echo(FeedbackManager.gray(message="\nWatching for changes..."))
|
|
54
57
|
watcher_thread = threading.Thread(
|
|
55
58
|
target=watch_project,
|
|
@@ -112,6 +115,7 @@ def build_project(project: Project, tb_client: TinyB) -> None:
|
|
|
112
115
|
click.echo(FeedbackManager.info(message=f"✓ {pipe_path} created"))
|
|
113
116
|
|
|
114
117
|
try:
|
|
118
|
+
new_tb_client = asyncio.run(get_tinybird_local_client(str(project.path)))
|
|
115
119
|
for filename in project_files:
|
|
116
120
|
if filename.endswith(".datasource"):
|
|
117
121
|
ds_path = Path(filename)
|
|
@@ -124,7 +128,7 @@ def build_project(project: Project, tb_client: TinyB) -> None:
|
|
|
124
128
|
fixture_path = fixture_folder / f"{ds_name}.ndjson"
|
|
125
129
|
|
|
126
130
|
if fixture_path.exists():
|
|
127
|
-
append_fixture(
|
|
131
|
+
append_fixture(new_tb_client, ds_name, str(fixture_path))
|
|
128
132
|
except Exception:
|
|
129
133
|
pass
|
|
130
134
|
|
|
@@ -178,3 +182,11 @@ def rebuild_fixture(project: Project, tb_client: TinyB, fixture: str) -> None:
|
|
|
178
182
|
|
|
179
183
|
if ds_path.exists():
|
|
180
184
|
append_fixture(tb_client, ds_name, str(fixture_path))
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def build_and_print_resource(tb_client: TinyB, filename: str):
|
|
188
|
+
resource_path = Path(filename)
|
|
189
|
+
name = resource_path.stem
|
|
190
|
+
pipeline = name if filename.endswith(".pipe") else None
|
|
191
|
+
res = asyncio.run(tb_client.query(f"SELECT * FROM {name} FORMAT JSON", pipeline=pipeline))
|
|
192
|
+
print_table_formatted(res, name)
|
|
@@ -14,9 +14,9 @@ from prompt_toolkit.key_binding import KeyBindings
|
|
|
14
14
|
from prompt_toolkit.shortcuts import CompleteStyle
|
|
15
15
|
from prompt_toolkit.styles import Style
|
|
16
16
|
|
|
17
|
-
from tinybird.client import TinyB
|
|
18
17
|
from tinybird.tb.modules.exceptions import CLIException
|
|
19
18
|
from tinybird.tb.modules.feedback_manager import FeedbackManager, bcolors
|
|
19
|
+
from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
20
20
|
from tinybird.tb.modules.project import Project
|
|
21
21
|
from tinybird.tb.modules.table import format_table
|
|
22
22
|
|
|
@@ -174,10 +174,9 @@ def _(event):
|
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
class Shell:
|
|
177
|
-
def __init__(self, project: Project
|
|
177
|
+
def __init__(self, project: Project):
|
|
178
178
|
self.history = self.get_history()
|
|
179
179
|
self.project = project
|
|
180
|
-
self.client = client
|
|
181
180
|
self.prompt_message = "\ntb > "
|
|
182
181
|
self.commands = ["create", "mock", "test", "tb", "select"]
|
|
183
182
|
self.session: PromptSession = PromptSession(
|
|
@@ -286,8 +285,9 @@ class Shell:
|
|
|
286
285
|
loop = asyncio.new_event_loop()
|
|
287
286
|
asyncio.set_event_loop(loop)
|
|
288
287
|
try:
|
|
288
|
+
tb_client = asyncio.run(get_tinybird_local_client(str(self.project.path)))
|
|
289
289
|
return loop.run_until_complete(
|
|
290
|
-
|
|
290
|
+
tb_client.query(f"SELECT * FROM ({query}) LIMIT {rows_limit} FORMAT JSON")
|
|
291
291
|
)
|
|
292
292
|
finally:
|
|
293
293
|
loop.close()
|
|
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.dev38 → tinybird-0.0.1.dev39}/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
|
|
File without changes
|
{tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev38 → tinybird-0.0.1.dev39}/tinybird/tb/modules/datafile/parse_datasource.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
|
|
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.dev38 → tinybird-0.0.1.dev39}/tinybird/tb_cli_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
|