Download the PHP package keboola/table-backend-utils without Composer
On this page you can find all versions of the php package keboola/table-backend-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download keboola/table-backend-utils
More information about keboola/table-backend-utils
Files in keboola/table-backend-utils
Package table-backend-utils
Short Description Package allows to import files to Snowflake from multiple cloud storages
License MIT
Informations about the package table-backend-utils
Table backend utils
Common stuff for table backends (Snowflake|Redshift) shared between apps.
Interfaces
Database
Keboola\TableBackendUtils\Database\DatabaseReflectionInterface
Schema
Keboola\TableBackendUtils\Schema\SchemaReflectionInterface
Function to retrieve information's about schema:
Table
Keboola\TableBackendUtils\Table\TableReflectionInterface
Function to retrieve information's about table:
Keboola\TableBackendUtils\Table\TableQueryBuilderInterface
Queries to work with table:
Keboola\TableBackendUtils\Table\TableStatsInterface
Table statistics
Column
Keboola\TableBackendUtils\Column\ColumnInterface
Table column definition:
View
Keboola\TableBackendUtils\View\ViewReflectionInterface
Function to retrieve information's about view:
Auth
Keboola\TableBackendUtils\Auth\UserReflectionInterface
Keboola\TableBackendUtils\Auth\GrantQueryBuilderInterface
Development
Preparation
Set up envs:
Set TEST_PREFIX= ENV
AWS
In order to download TD odbc driver, create a user who can access S3 bucket with the driver package.
set up env variables:
Snowflake
Prepare credentials for Snowflake access
set up env variables:
Setup snowflake Key-pair authentication
For the new key-pair authentication, which will be the only preferred method going forward, please follow these steps:
-
Open a terminal window and generate a private key and a public key using the following command:
- Assign the public key to a Snowflake user using the following command:
Alternatively, you can use a command that generates a query for you:
- For local tests and CI we need to edit the private key to one line and trim
-----BEGIN PRIVATE KEY----- -----END PRIVATE KEY-----We can do this withcat rsa_key.p8 | sed '1d;$d' | tr -d '\n' - Let's save the output of the command as environment variable
SNOWFLAKE_PRIVATE_KEYin the.envfile or in your PhpStorm.
Bigquery
To prepare the backend you can use Terraform template.
You must have the resourcemanager.folders.create permission for the organization.
After terraform apply ends go to the service project in folder created by terraform.
- go to the newly created service project, the project id are listed at the end of the terraform call. (service_project_id)
- click on IAM & Admin
- on left panel choose Service Accounts
- click on email of service account(there is only one)
- on to the top choose Keys and Add Key => Create new key
- select Key type JSON
- click on the Create button and the file will automatically download
- convert key to string
awk -v RS= '{$1=$1}1' <key_file>.json >> .env - set content on last line of .env as variable
BQ_KEY_FILE
setup envs:
Tests
Run tests with following command.
Unit and functional test can be run sepparetly
Code quality check
Full CI workflow
This command will run all checks load fixtures and run tests
Teradata connection
You can use following method to get connection to Teradata for your queries
If you want to use connection via PHPStorm DataGrip or other DB client, remove port when you setting up connection in client. Otherwise test connection will fail.
License
MIT licensed, see LICENSE file.
All versions of table-backend-utils with dependencies
ext-json Version *
ext-odbc Version *
ext-pdo Version *
doctrine/dbal Version ^3.3
google/cloud-bigquery Version ^1.23
keboola/common-exceptions Version ^1
keboola/php-datatypes Version >=8
keboola/php-utils Version ^4.1
keboola/retry Version ^0.5.0