tinybird 0.0.1.dev182__tar.gz → 0.0.1.dev183__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.dev182 → tinybird-0.0.1.dev183}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/fixture.py +11 -5
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datasource.py +7 -9
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/setup.cfg +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/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/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.dev183'
|
|
8
|
+
__revision__ = '1e2d149'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
|
-
from typing import Any, Dict, List, Union
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
3
|
|
|
4
4
|
from tinybird.tb.modules.common import format_data_to_ndjson
|
|
5
5
|
|
|
@@ -17,10 +17,16 @@ def persist_fixture_sql(fixture_name: str, sql: str, folder: str) -> Path:
|
|
|
17
17
|
return fixture_file
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def persist_fixture(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
def persist_fixture(
|
|
21
|
+
fixture_name: str, data: Union[List[Dict[str, Any]], str], folder: str, format: str, target: Optional[str] = None
|
|
22
|
+
) -> Path:
|
|
23
|
+
if target:
|
|
24
|
+
fixture_file = Path(target)
|
|
25
|
+
extension = fixture_file.suffix
|
|
26
|
+
else:
|
|
27
|
+
fixture_dir = get_fixture_dir(folder)
|
|
28
|
+
fixture_file = fixture_dir / f"{fixture_name}.{format}"
|
|
29
|
+
extension = f".{format}"
|
|
24
30
|
if extension == FixtureExtension.NDJSON:
|
|
25
31
|
fixture_file.write_text(data if isinstance(data, str) else format_data_to_ndjson(data))
|
|
26
32
|
elif extension == FixtureExtension.CSV:
|
|
@@ -423,19 +423,15 @@ async def datasource_export(
|
|
|
423
423
|
Example usage:
|
|
424
424
|
- Export all rows as CSV: tb datasource export my_datasource
|
|
425
425
|
- Export 1000 rows as NDJSON: tb datasource export my_datasource --format ndjson --rows 1000
|
|
426
|
-
- Export to specific file: tb datasource export my_datasource --
|
|
426
|
+
- Export to specific file: tb datasource export my_datasource --target ./data/export.csv
|
|
427
427
|
"""
|
|
428
428
|
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
429
429
|
project: Project = ctx.ensure_object(dict)["project"]
|
|
430
430
|
|
|
431
|
-
# Determine output filename if not provided
|
|
432
|
-
if not target:
|
|
433
|
-
target = f"{datasource}.{format_}"
|
|
434
|
-
|
|
435
431
|
# Build query with optional row limit
|
|
436
432
|
query = f"SELECT * FROM {datasource} WHERE {where or 1} LIMIT {rows}"
|
|
437
433
|
|
|
438
|
-
click.echo(FeedbackManager.highlight(message=f"\n» Exporting {datasource}
|
|
434
|
+
click.echo(FeedbackManager.highlight(message=f"\n» Exporting {datasource}"))
|
|
439
435
|
|
|
440
436
|
try:
|
|
441
437
|
if format_ == "csv":
|
|
@@ -445,11 +441,13 @@ async def datasource_export(
|
|
|
445
441
|
|
|
446
442
|
res = await client.query(query)
|
|
447
443
|
|
|
448
|
-
|
|
449
|
-
file_size = os.path.getsize(
|
|
444
|
+
target_path = persist_fixture(datasource, res, project.folder, format=format_, target=target)
|
|
445
|
+
file_size = os.path.getsize(target_path)
|
|
450
446
|
|
|
451
447
|
click.echo(
|
|
452
|
-
FeedbackManager.success(
|
|
448
|
+
FeedbackManager.success(
|
|
449
|
+
message=f"✓ Exported data to {str(target_path).replace(project.folder, '')} ({humanfriendly.format_size(file_size)})"
|
|
450
|
+
)
|
|
453
451
|
)
|
|
454
452
|
|
|
455
453
|
except Exception as e:
|
|
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.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb/modules/datafile/parse_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/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
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/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.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev183}/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
|